<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
	<script type="text/javascript">
		$(function() {
			var treeData = [ {
				text : "用户管理",
				children : [ {
					text : "查看所有用户",
					attributes : {
						url : "admin/admin.jsp"
					}
				}, {
					text : "添加/删除用户信息",
					attributes : {
						url : "admin/userAdd.jsp"
					}
				}, {
					text : "修改用户信息",
					attributes : {
						url : "admin/userUpdate.jsp"
					}
				} ]
			}, {
				text : "客户管理",
				children : [ {
					text : "查看所有客户",
					attributes : {
						url : "customer/customer.jsp"
					}
				}, {
					text : "添加/删除客户信息",
					attributes : {
						url : "customer/customerAdd.jsp"
					}
				}, {
					text : "修改客户信息",
					attributes : {
						url : "customer/customerUpdate.jsp"
					}
				} ]
			}, {
				text : "业务与人际关系管理",
				children : [ {
					text : "查看所有业务",
					attributes : {
						url : "business/business.jsp"
					}
				}, {
					text : "添加/删除业务信息",
					attributes : {
						url : "business/businessAdd.jsp"
					}
				}, {
					text : "修改业务信息",
					attributes : {
						url : "business/businessUpdate.jsp"
					}
				}, {
					text : "显示所有合作",
					attributes : {
						url : "business/showUserAndCustomerRelation.jsp"
					}
				} ]
			}, {
				text : "工具箱",
				children : [ {
					text : "网站导航",
					attributes : {
						url : "http://hao.uc.cn/"
					//url : "http://site.baidu.com"
					}
				} ]
			} ];

			$("#tree").tree({
				data : treeData,
				lines : true,
				onClick : function(node) {
					if (node.attributes) {
						openTab(node.text, node.attributes.url);
					}
				}
			})

			function openTab(text, url) {
				if ($("#tabs").tabs('exists', text)) {
					$("#tabs").tabs('select', text);
				} else {
					var content = "<iframe frameborder='0' scrolling='auto' style='width:100%;height:100%;' src=" + url
							+ "></iframe>";
					$("#tabs").tabs('add', {
						title : text,
						closable : true,
						content : content
					});
				}
			}
			$('#c_calendar').calendar({
				fit : false,
				width : 194,
				height : 180,
				current : new Date()
			});
		});
	</script>
	<ul id="tree" class="easyui-tree"></ul>
	<div id="c_calendar" style="position: absolute; left: 0px; bottom: 0px;"></div>
</body>
</html>